package com.finance.cooperate.feature.core.feature;


import com.finance.cooperate.common.constant.Constant;
import com.finance.cooperate.common.enumerate.ScrapyAppCategoriesEnum;
import com.finance.cooperate.common.utils.SpringContextUtil;
import com.finance.cooperate.dao.local.cache.CrcCache;
import com.finance.cooperate.dao.local.cache.ScrapyCache;
import com.finance.cooperate.dao.local.cache.SmsCategoryCache;
import com.finance.cooperate.feature.core.feature.applist.AppListRetentiveTime;
import com.finance.cooperate.feature.core.feature.applist.AppListV1;
import com.finance.cooperate.feature.core.feature.smsphone.SmsOppositesV1;
import com.finance.cooperate.feature.core.service.FeatureOneHotService;

import java.util.*;

/**
 * @ClassName FeatureAllSet
 * @Description 输出的特征集合 离线跑特征的时候用的
 * @Author shen
 * @Date 2022/5/25 16:31
 * @Modify ...
 */
public interface FeatureAllSet {

    /**
     * @Author shen
     * @Description 输出模型特征：
     *              key 表示输出向；value 和FeatureDefinition 的value 对应；
     * @Date 1:47 下午 2020/6/12
     * @Param
     * @return
     **/
    Map<String,String> modelFeature = new HashMap<String,String>() {
        {

            //手动注入
            FeatureOneHotService featureOneHotService = (FeatureOneHotService) SpringContextUtil
                    .getApplicationContext().getBean("featureOneHotServiceImpl");

            // 对于普通非热编码特征自动 put 进去
            FeatureDefinition[] featureDefinitions = FeatureDefinition.values();
            for(FeatureDefinition f : featureDefinitions) {
                if (!f.getIsOneHot() && f.getStatus()) {
                    put(f.getValue(), f.getValue());
                }
            }



            // ************************ DeviceReader ************************
            put(FeatureDefinition.f_device_brand_.getValue(), FeatureDefinition.f_device_brand_.getValue());
            for (Long v : featureOneHotService.getOneHotList(FeatureOneHotType.ONE_HOT_FEATURE_TYPE_001.getValue())) {
                put(FeatureDefinition.f_device_brand_.getValue() + v, FeatureDefinition.f_device_brand_.getValue());
            }

            put(FeatureDefinition.f_device_operator_.getValue(), FeatureDefinition.f_device_operator_.getValue());
            for (Long v : featureOneHotService.getOneHotList(FeatureOneHotType.ONE_HOT_FEATURE_TYPE_002.getValue())) {
                put(FeatureDefinition.f_device_operator_.getValue() + v, FeatureDefinition.f_device_operator_.getValue());
            }

            put(FeatureDefinition.f_device_time_zone_.getValue(), FeatureDefinition.f_device_time_zone_.getValue());
            for (Long v : featureOneHotService.getOneHotList(FeatureOneHotType.ONE_HOT_FEATURE_TYPE_003.getValue())) {
                put(FeatureDefinition.f_device_time_zone_.getValue() + v, FeatureDefinition.f_device_time_zone_.getValue());
            }

            put(FeatureDefinition.f_device_country_.getValue(), FeatureDefinition.f_device_country_.getValue());
            for (Long v : featureOneHotService.getOneHotList(FeatureOneHotType.ONE_HOT_FEATURE_TYPE_004.getValue())) {
                put(FeatureDefinition.f_device_country_.getValue() + v, FeatureDefinition.f_device_country_.getValue());
            }

            put(FeatureDefinition.f_device_network_.getValue(), FeatureDefinition.f_device_network_.getValue());
            for (Long v : featureOneHotService.getOneHotList(FeatureOneHotType.ONE_HOT_FEATURE_TYPE_005.getValue())) {
                put(FeatureDefinition.f_device_network_.getValue() + v, FeatureDefinition.f_device_network_.getValue());
            }


            // ************************ SmsReader ************************
            // 基础统计 V1
            for (String k : SmsCategoryCache.getTimeSplitsV1().keySet()) {

                super.put(FeatureDefinition.f_sms_basic_v1_.getValue() + "receive_count_" + k, FeatureDefinition.f_sms_basic_v1_.getValue());

                super.put(FeatureDefinition.f_sms_basic_v1_.getValue() + "square_count_" + k, FeatureDefinition.f_sms_basic_v1_.getValue());

                super.put(FeatureDefinition.f_sms_basic_v1_.getValue() + "phone_num_count_" + k, FeatureDefinition.f_sms_basic_v1_.getValue());

                super.put(FeatureDefinition.f_sms_basic_v1_.getValue() + "phone_rate_" + k, FeatureDefinition.f_sms_basic_v1_.getValue());



                super.put(FeatureDefinition.f_sms_basic_v1_.getValue() + "website_count_" + k, FeatureDefinition.f_sms_basic_v1_.getValue());

                for (String speiType : Arrays.asList("receipt", "payment")) {
                    super.put(FeatureDefinition.f_sms_basic_v1_.getValue() + "spei_" + speiType + "_count_" + k, FeatureDefinition.f_sms_basic_v1_.getValue());
                    super.put(FeatureDefinition.f_sms_basic_v1_.getValue() + "spei_" + speiType + "_amount_" + k, FeatureDefinition.f_sms_basic_v1_.getValue());
                }

                super.put(FeatureDefinition.f_sms_basic_v1_.getValue() + "spei_income_amount_" + k, FeatureDefinition.f_sms_basic_v1_.getValue());


                for (Integer i : Arrays.asList(2, 6, 9, 12, 15, 20, 25, 30, 60)) {
                    super.put(FeatureDefinition.f_sms_basic_v1_.getValue() + "same_opposite_" + k + "_" + i, FeatureDefinition.f_sms_basic_v1_.getValue());
                }

                super.put(FeatureDefinition.f_sms_basic_v1_.getValue() + "send_count_" + k, FeatureDefinition.f_sms_basic_v1_.getValue());


                super.put(FeatureDefinition.f_sms_basic_v1_.getValue() + "receive_days_count_" + k, FeatureDefinition.f_sms_basic_v1_.getValue());
                super.put(FeatureDefinition.f_sms_basic_v1_.getValue() + "send_days_count_" + k, FeatureDefinition.f_sms_basic_v1_.getValue());

            }

            for (Integer t : Arrays.asList(30, 15, 7, 3, 1, 0, -1, -3, -7, -15, -30, Integer.MIN_VALUE)) {

                if (t.equals(Integer.MIN_VALUE)) {
                    super.put(FeatureDefinition.f_sms_basic_v1_.getValue() + "contain_date_diff_d", FeatureDefinition.f_sms_basic_v1_.getValue());
                } else if (t >= 0) {
                    super.put(FeatureDefinition.f_sms_basic_v1_.getValue() + "contain_date_diff_" + t, FeatureDefinition.f_sms_basic_v1_.getValue());
                } else {
                    super.put(FeatureDefinition.f_sms_basic_v1_.getValue() + "contain_date_diff_d" + Math.abs(t), FeatureDefinition.f_sms_basic_v1_.getValue());
                }

            }



            SmsCategoryCache.getTimeSplitsV1().forEach((k, v) -> {

                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "overdue_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());
                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "overdue_amount_max_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());
                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "overdue_amount_min_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());
                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "overdue_amount_sum_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());
                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "overdue_amount_count_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());
                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "overdue_amount_avg_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());


                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "loan_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());
                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "loan_amount_max_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());
                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "loan_amount_min_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());
                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "loan_amount_sum_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());
                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "loan_amount_count_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());
                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "loan_amount_avg_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());

                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "pay_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());
                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "income_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());


                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "common_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());


                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "overdue_top_competition_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());
                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "loan_top_competition_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());

                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "overdue_tala_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());
                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "loan_tala_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());


                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "overdue_stori_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());
                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "loan_stori_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());

                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "overdue_superapoyo_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());
                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "loan_superapoyo_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());


                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "dias_max_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());
                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "dias_min_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());

                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "dias_count_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());

                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "dias_avg_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());

                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "dias_median_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());

                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "dias_distinct_count_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());

                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "dias_distinct_avg_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());

                super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "dias_distinct_median_" + k, FeatureDefinition.f_sms_loan_v1_.getValue());


            });

            super.put(FeatureDefinition.f_sms_loan_v1_.getValue() + "overdue_opposite_1w", FeatureDefinition.f_sms_loan_v1_.getValue());



            // app竞品等级 + 逾期短信
            SmsCategoryCache.getTimeSplitsV1().forEach((k, v) -> {

                super.put(FeatureDefinition.f_intermediate_competition_.getValue() + "v1_overdue_" + k, FeatureDefinition.f_intermediate_competition_.getValue());
                super.put(FeatureDefinition.f_intermediate_competition_.getValue() + "v2_overdue_" + k, FeatureDefinition.f_intermediate_competition_.getValue());

            });



            // ************************ CrcReader ************************
            /*CrcCache.getTimeSplitsV1().forEach((tk, tv) -> {

                CrcCache.getGrantMapValues().forEach(gv -> {

                    CrcCache.getCreditTypeMapValues().forEach(cv -> {

                        CrcCache.getCurrencyMapValues().forEach(crv -> {

                            super.put(FeatureDefinition.f_crc_consultas_.getValue() + String.format("%s_grant_%d_credit_%s_currency_%s_amount_sum", tk, gv, cv, crv), FeatureDefinition.f_crc_consultas_.getValue());

                            super.put(FeatureDefinition.f_crc_consultas_.getValue() + String.format("%s_grant_%d_credit_%s_currency_%s_count", tk, gv, cv, crv), FeatureDefinition.f_crc_consultas_.getValue());

                            super.put(FeatureDefinition.f_crc_consultas_.getValue() + String.format("%s_grant_%d_credit_%s_currency_%s_amount_max", tk, gv, cv, crv), FeatureDefinition.f_crc_consultas_.getValue());

                            super.put(FeatureDefinition.f_crc_consultas_.getValue() + String.format("%s_grant_%d_credit_%s_currency_%s_amount_min", tk, gv, cv, crv), FeatureDefinition.f_crc_consultas_.getValue());

                            super.put(FeatureDefinition.f_crc_consultas_.getValue() + String.format("%s_grant_%d_credit_%s_currency_%s_amount_avg", tk, gv, cv, crv), FeatureDefinition.f_crc_consultas_.getValue());

                        });

                    });

                    CrcCache.getCurrencyMapValues().forEach(crv -> {

                        super.put(FeatureDefinition.f_crc_consultas_.getValue() + String.format("%s_grant_%d_currency_%s_amount_sum", tk, gv, crv), FeatureDefinition.f_crc_consultas_.getValue());

                        super.put(FeatureDefinition.f_crc_consultas_.getValue() + String.format("%s_grant_%d_currency_%s_count", tk, gv, crv), FeatureDefinition.f_crc_consultas_.getValue());

                        super.put(FeatureDefinition.f_crc_consultas_.getValue() + String.format("%s_grant_%d_currency_%s_amount_max", tk, gv, crv), FeatureDefinition.f_crc_consultas_.getValue());

                        super.put(FeatureDefinition.f_crc_consultas_.getValue() + String.format("%s_grant_%d_currency_%s_amount_min", tk, gv, crv), FeatureDefinition.f_crc_consultas_.getValue());

                        super.put(FeatureDefinition.f_crc_consultas_.getValue() + String.format("%s_grant_%d_currency_%s_amount_avg", tk, gv, crv), FeatureDefinition.f_crc_consultas_.getValue());

                    });

                });


                CrcCache.getCreditTypeMapValues().forEach(cv -> {

                    CrcCache.getCurrencyMapValues().forEach(crv -> {

                        super.put(FeatureDefinition.f_crc_consultas_.getValue() + String.format("%s_credit_%s_currency_%s_amount_sum", tk, cv, crv), FeatureDefinition.f_crc_consultas_.getValue());

                        super.put(FeatureDefinition.f_crc_consultas_.getValue() + String.format("%s_credit_%s_currency_%s_count", tk, cv, crv), FeatureDefinition.f_crc_consultas_.getValue());

                        super.put(FeatureDefinition.f_crc_consultas_.getValue() + String.format("%s_credit_%s_currency_%s_amount_max", tk, cv, crv), FeatureDefinition.f_crc_consultas_.getValue());

                        super.put(FeatureDefinition.f_crc_consultas_.getValue() + String.format("%s_credit_%s_currency_%s_amount_min", tk, cv, crv), FeatureDefinition.f_crc_consultas_.getValue());

                        super.put(FeatureDefinition.f_crc_consultas_.getValue() + String.format("%s_credit_%s_currency_%s_amount_avg", tk, cv, crv), FeatureDefinition.f_crc_consultas_.getValue());

                    });

                });


                CrcCache.getCurrencyMapValues().forEach(crv -> {

                    super.put(FeatureDefinition.f_crc_consultas_.getValue() + String.format("%s_currency_%s_amount_sum", tk, crv), FeatureDefinition.f_crc_consultas_.getValue());

                    super.put(FeatureDefinition.f_crc_consultas_.getValue() + String.format("%s_currency_%s_count", tk, crv), FeatureDefinition.f_crc_consultas_.getValue());

                    super.put(FeatureDefinition.f_crc_consultas_.getValue() + String.format("%s_currency_%s_amount_max", tk, crv), FeatureDefinition.f_crc_consultas_.getValue());

                    super.put(FeatureDefinition.f_crc_consultas_.getValue() + String.format("%s_currency_%s_amount_min", tk, crv), FeatureDefinition.f_crc_consultas_.getValue());

                    super.put(FeatureDefinition.f_crc_consultas_.getValue() + String.format("%s_currency_%s_amount_avg", tk, crv), FeatureDefinition.f_crc_consultas_.getValue());

                });

                super.put(FeatureDefinition.f_crc_consultas_.getValue() + String.format("%s_grant_size", tk), FeatureDefinition.f_crc_consultas_.getValue());

                super.put(FeatureDefinition.f_crc_consultas_.getValue() + String.format("%s_credit_type_size", tk), FeatureDefinition.f_crc_consultas_.getValue());

            });*/



            // ************************ AppReader *************************

            AppListRetentiveTime.app.forEach((s) -> {

                String replace = s.replace(".", "_");
                put(FeatureDefinition.f_app_retentive_time_.getValue() + replace, FeatureDefinition.f_app_retentive_time_.getValue());

            });

            // ************************ 子模型训练使用 *************************






            /*

            // 训练子模型才使用（下面都是）


            // 短信子模型 V1
            for (String k : SmsCategoryCache.getTimeSplitsV1().keySet()) {

                List<Integer> list = Arrays.asList(0, 10, 30, 50, 100, 150, 200, 500, 900, Integer.MAX_VALUE);
                for (int i = 0; i < list.size(); i++) {
                    super.put(FeatureDefinition.f_sms_model_v1_.getValue() + "receive_count_" + k + "_" + i, FeatureDefinition.f_sms_model_v1_.getValue());
                }

                list = Arrays.asList(0, 3, 5, 8, 12, 18, 25, 50, 120, Integer.MAX_VALUE);
                for (int i = 0; i < list.size(); i++) {
                    super.put(FeatureDefinition.f_sms_model_v1_.getValue() + "square_count_" + k + "_" + i, FeatureDefinition.f_sms_model_v1_.getValue());
                }

                list = Arrays.asList(0, 3, 6, 9, 15, 25, 50, 90, 120, Integer.MAX_VALUE);
                for (int i = 0; i < list.size(); i++) {
                    super.put(FeatureDefinition.f_sms_model_v1_.getValue() + "phone_num_count_" + k + "_" + i, FeatureDefinition.f_sms_model_v1_.getValue());
                }

                for (Integer c : Arrays.asList(2, 6, 9, 12, 15, 20, 25, 30, 60)) {
                    list = Arrays.asList(0, 3, 7, 10, 15, 20, 30, 50, Integer.MAX_VALUE);
                    for (int i = 0; i < list.size(); i++) {
                        super.put(FeatureDefinition.f_sms_model_v1_.getValue() + "same_opposite_" + k + "_" + c + "_" + i, FeatureDefinition.f_sms_model_v1_.getValue());
                    }
                }

                list = Arrays.asList(0, 10, 30, 50, 100, Integer.MAX_VALUE);
                for (int i = 0; i < list.size(); i++) {
                    super.put(FeatureDefinition.f_sms_model_v1_.getValue() + "send_count_" + k + "_" + i, FeatureDefinition.f_sms_model_v1_.getValue());
                }

                list = Arrays.asList(0, 2, 6, 11, 24, 39, 54, 84, 148, Integer.MAX_VALUE);
                for (int i = 0; i < list.size(); i++) {
                    super.put(FeatureDefinition.f_sms_model_v1_.getValue() + "website_count_" + k + "_" + i, FeatureDefinition.f_sms_model_v1_.getValue());
                }

                list = Arrays.asList(0, 1, 3, 7, Integer.MAX_VALUE);
                for (int i = 0; i < list.size(); i++) {
                    super.put(FeatureDefinition.f_sms_model_v1_.getValue() + "overdue_" + k + "_" + i, FeatureDefinition.f_sms_model_v1_.getValue());
                }

                list = Arrays.asList(0, 1, 5, Integer.MAX_VALUE);
                for (int i = 0; i < list.size(); i++) {
                    super.put(FeatureDefinition.f_sms_model_v1_.getValue() + "loan_" + k + "_" + i, FeatureDefinition.f_sms_model_v1_.getValue());
                }

            }

            // 用户基本信息子模型特征
            for (int gender: Arrays.asList(1, 2)) {
                put(FeatureDefinition.f_intermediate_feature_base_gender_.getValue() + gender, FeatureDefinition.f_intermediate_feature_base_gender_.getValue());
            }
            for (int marital: Arrays.asList(1, 2, 3, 4, 5)) {
                put(FeatureDefinition.f_intermediate_feature_base_marital_.getValue() + marital, FeatureDefinition.f_intermediate_feature_base_marital_.getValue());
            }
            for (int age: Arrays.asList(15, 20, 25, 30, 35, 40, 45, 50, 55, 60)) {

                put(FeatureDefinition.f_intermediate_feature_base_age_.getValue() + age, FeatureDefinition.f_intermediate_feature_base_age_.getValue());

            }



            // app安装相关子模型特征
            AppListV1.app.forEach((s) -> {

                String replace = s.replace(".", "_");

                put(FeatureDefinition.f_app_install_model_v1_.getValue() + replace, FeatureDefinition.f_app_install_model_v1_.getValue());

                for(int v : Constant.APP_TIME_PARTITION_ARR_01) {

                    put(FeatureDefinition.f_app_time_model_v1_.getValue() + replace + "_" + v, FeatureDefinition.f_app_time_model_v1_.getValue());

                }


            });



            // 爬虫子模型，XGB
            for (String code : ScrapyAppCategoriesEnum.getCodes()) {

                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_monetization_is_free_avg", FeatureDefinition.f_scrapy_apps_type_.getValue());
                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_monetization_is_free_sum", FeatureDefinition.f_scrapy_apps_type_.getValue());
                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_monetization_has_iap_avg", FeatureDefinition.f_scrapy_apps_type_.getValue());
                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_monetization_has_iap_sum", FeatureDefinition.f_scrapy_apps_type_.getValue());
                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_monetization_has_ads_avg", FeatureDefinition.f_scrapy_apps_type_.getValue());
                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_monetization_has_ads_sum", FeatureDefinition.f_scrapy_apps_type_.getValue());
                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_monetization_price_avg", FeatureDefinition.f_scrapy_apps_type_.getValue());
                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_monetization_price_sum", FeatureDefinition.f_scrapy_apps_type_.getValue());
                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_monetization_price_non_zero_count", FeatureDefinition.f_scrapy_apps_type_.getValue());
                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_rating_stars_avg", FeatureDefinition.f_scrapy_apps_type_.getValue());
                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_rating_stars_min", FeatureDefinition.f_scrapy_apps_type_.getValue());
                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_rating_stars_max", FeatureDefinition.f_scrapy_apps_type_.getValue());
                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_rating_count_avg", FeatureDefinition.f_scrapy_apps_type_.getValue());
                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_rating_count_min", FeatureDefinition.f_scrapy_apps_type_.getValue());
                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_rating_count_max", FeatureDefinition.f_scrapy_apps_type_.getValue());
                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_downloads_avg", FeatureDefinition.f_scrapy_apps_type_.getValue());
                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_downloads_min", FeatureDefinition.f_scrapy_apps_type_.getValue());
                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_countries_len_avg", FeatureDefinition.f_scrapy_apps_type_.getValue());
                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_countries_len_min", FeatureDefinition.f_scrapy_apps_type_.getValue());
                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_lang_len_avg", FeatureDefinition.f_scrapy_apps_type_.getValue());
                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_lang_len_min", FeatureDefinition.f_scrapy_apps_type_.getValue());
                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_lang_len_lt5", FeatureDefinition.f_scrapy_apps_type_.getValue());
                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_download_size_avg", FeatureDefinition.f_scrapy_apps_type_.getValue());
                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_download_size_sum", FeatureDefinition.f_scrapy_apps_type_.getValue());
                super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_inferred_female_percent_avg", FeatureDefinition.f_scrapy_apps_type_.getValue());

                for (Integer value : ScrapyCache.getTypeContentRatingValueMapValues()) {
                    super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_content_rating_value_" + value, FeatureDefinition.f_scrapy_apps_type_.getValue());
                }

                for (Integer value : ScrapyCache.getTypeInferredGenderClassificationMapValues()) {
                    super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_inferred_gender_" + value, FeatureDefinition.f_scrapy_apps_type_.getValue());
                }

                for (Integer value : ScrapyCache.getTypeInferredAgePercentagesMapValues()) {
                    super.put(FeatureDefinition.f_scrapy_apps_type_.getValue() + code + "_inferred_age_" + value, FeatureDefinition.f_scrapy_apps_type_.getValue());
                }

            }


            // 常见短信发送方统计
            for (String opp : SmsOppositesV1.phone) {

                opp = opp.replace(" ", "_");

                String finalOpp = opp;
                SmsCategoryCache.getTimeSplitsV1().forEach((k, v) -> {

                    for (Integer i : Arrays.asList(0, 1, 2, 3, 4, 5)) {

                        super.put(FeatureDefinition.f_sms_oppo_.getValue() + finalOpp + "_" + k + "_" + i, FeatureDefinition.f_sms_oppo_.getValue());

                    }
                });
            }



             */


        }
    };
}
